Trading t-gates for qubits in arbitrary state and unitary synthesis

ABSTRACT

Efficient synthesis of arbitrary quantum states and unitaries from a universal fault tolerant gate-set (e.g., Clifford+T) is a goal in quantum computation. As physical quanturn computers are fixed in size, all available qubits should be used if it minimizes overall gate counts, especially that of the expensive T-gates. In this application, a quantum algorithm is described for preparing any dimension-N quantum state specified by a list of N classical numbers, that realizes a trade-off between space and T-gates. Example embodiments exploit  (λ) ancilla qubits, to reduce the T-gate cost to 
     
       
         
           
             
                
                
               
                 ( 
                 
                   
                     N 
                     λ 
                   
                   + 
                   
                     
                       λlog 
                       2 
                     
                      
                     
                       N 
                       ϵ 
                     
                   
                 
                 ) 
               
             
             . 
           
         
       
     
     Notably, this it proven to be optimal up to logarithmic factors for any λ=o(√{square root over (N)}) through an unconditional gate counting argument. Though  (N) Clifford gates are always required, only  (√{square root over (N)}) T-gates are needed in the best case, which is a quadratic improvement over prior art. Similar statements are provien for unitary synthesis by reduction to state preparation.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No. 62/752,887 entitled “TRADING T-GATES FOR QUBITS IN ARBITRARY STATE AND UNITARY SYNTHESIS” and filed on Oct. 30, 2018, which is hereby incorporated herein by reference in its entirety.

FIELD

This application relates to quantum computing. In particular, this application relates to tools and techniques for trading T-gates for qubits in an arbitrary state and unitary synthesis.

SUMMARY

Efficient synthesis of arbitrary quantum states and unitaries from a universal fault-tolerant gate-set (e.g., Clifford+T) is a goal in quantum computation. As physical quantum computers are fixed in size, all available qubits should be used if it minimizes overall gate counts, especially that of the expensive T-gates. In this application, a quantum algorithm is described for preparing any dimension-N quantum state specified by a list of N classical numbers, that realizes a trade-off between space and T-gates. Example embodiments exploit

(λ) ancilla qubits, to reduce the T-gate cost to

${\left( {\frac{N}{\lambda} + {{\lambda log}^{2}\frac{N}{\epsilon}}} \right)}.$

Notably, this is proven to be optimal up to logarithmic factors for any λ=o(√{square root over (N)}) through an unconditional gate counting argument. Though

(N) Clifford gates are always required, only

(√{square root over (N)}) T-gates are needed in the best case, which is a quadratic improvement over prior art. Similar statements are provien for unitary synthesis by reduction to state preparation.

In certain embodiments, a quantum algorithm description is input (e.g., into a classical computer). The quantum algorithm description is synthesized into a synthesized quantum circuit representation (e.g., using the classical computer and using an appropriate compilation/synthesis tool for quantum computing). In the illustrated embodiment, the quantum circuit representation is implementable on a quantum computing device, and the synthesizing comprises assigning one or more ancilla qubits to be used for at least one non-Clifford operation. The synthesized quantum circuit representation is output (e.g., the synthesized quantum circuit representation is a set of low-level machine instructions for .implementation on a quantum device).

Any of the disclosed embodiments can be implemented by one or more computer-readable media storing computer-executable instructions, which when executed by a computer cause the computer to perform any of the disclosed methods. Also disclosed herein are systems for performing embodiments of the disclosed embodiments comprising a classical computer configured to program, control, and/or measure a quantum computing device. The foregoing and other objects, features, and advantages of the disclosed technology will become more apparent from the following detailed description, which proceeds with reference to the accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a series of schematic block diagram illustrating aspects of the disclosed technology.

FIG. 2 illustrates a generalized example of a suitable classical computing environment in which several of the described embodiments can be implemented.

FIG. 3 is an example of a client-server network for implementing a system according to the disclosed technology.

FIG. 4 is an example of a distributed computing environment for implementing a system according to the disclosed technology.

FIG. 5 is an exemplary system for implementing embodiments of the disclosed technology.

FIG. 6 is a flowchart showing an example embodiment for implementing an embodiment of the disclosed technology.

FIG. 7 is a flowchart showing another example embodiment for implementing an embodiment of the disclosed technology.

DETAILED DESCRIPTION I. General Considerations

As used in this application, the singular forms “a,” “an,” and “the” include the :plural forms unless the context clearly dictates otherwise. Additionally, the term “includes” means “comprises.” Further, the term “coupled” does not exclude the presence of intermediate elements between the coupled items. Further, as used herein, the term “and/or” means any one item or combination of any items in the phrase.

Although the operations of some of the disclosed methods are described in a particular, sequential order for convenient presentation, it should be understood that this manner of description encompasses rearrangement, unless a particular ordering is required by specific language set forth below. For example, operations described sequentially may in some cases be rearranged or performed concurrently. Moreover, for the sake of simplicity, the attached figures may not show the various ways in which the disclosed systems, methods, and apparatus can be used in conjunction with other systems, methods, and apparatus. Additionally, the description sometimes uses terms like “produce” and “provide” to describe the disclosed methods. These terms are high-level abstractions of the actual operations that are performed. The actual operations that correspond to these terms will vary depending on the particular implementation and are readily discernible by one of ordinary the art.

II. Introduction

Many real-world applications of quantum algorithms rely on the input of classical data into a quantum system. It is often the case where achieving quantum speedups uses the ability to coherently access classical data in superposition. Examples where this is a useful step include machine learning, simulation of physical systems, solving systems of linear equations, data regression, and sampling.

The central challenge is synthesizing some arbitrary unitary A∈

^(N×N) specified by a list of N² complex coefficients. In any scalable approach to quantum computation, unitaries are desirably expressed in terms of a universal fault-tolerant quantum gate set, such as Clifford gates {H, S, C_(NOT)} and T gates. Also of interest is synthesizing any unitary that prepares an arbitrary quantum state A|0

=|ψ

of dimension: N—a special case also of interest. This state is similarly specified by N coefficients {right arrow over (a)}∈

^(N) that are completely arbitrary.

Solovay and Kitaev were the first to recognize that any single-qubit unitary could be ϵ-approximated using

(log^(c)(1/ϵ)) (for c=3.97) fault-tolerant gates. See M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 1st ed. (Cambridge University Press, 2004). Through a series of work, this has since been improved to an optimal c=1. See, e.g., V. Kliuchnikov, D. Maslov, and M. Mosca, Phys. Rev. Lett. 110, 190502 (2013); N. J. Ross, Quantum Info. Comput. 15, 932 (2015). By bootstrapping these results, it is known that without any ancilla qubits,

(N^({1,2})) log (N/ϵ) gates suffice to synthesize any {quantum state, unitary}. Though early approaches exploit ancilla qubits for the N=2 case, these only achieve constant factor improvements. See V. Kliuchnikov, B. Maslov, and M. Mosca, Phys. Rev. Lett. 110, 190502 (2013). Through gate-counting arguments (see, e.g., A. W. Harrow, B. Recht, and I. L. Chuang, Journal of Mathematical Physics 43, 4445 (2002), https://doi.org/10.1063/1.1495899), the dimension scaling and log (1/ϵ) factor appears optimal. Thus it appears there is nothing new to discover. All that remains is more and more precise constant factors.

However, not all fault-tolerant quantum gates are equal. It is now understood that fault-tolerant Clifford gates {H, S, CNOT} are generally cheap. In contrast, fault-tolerant non-Clifford T gates are incredibly expensive but very useful for universal quantum computing (see, e.g., M. A. Nielsen and I. L. Chuang, Quantum. Computation and Quantum information, 1st ed. (Cambridge University Press, 2004)). At physical error rates of 10⁻³, each T magic-state factory requires ˜100 to ˜1000 logical qubits to distill to machine-precision, and making a single T state costs a similar number of Clifford gates. See M. B. Hastings and J. Haah, Phys. Rev. Lett. 120, 050504 (2018). Though early approaches focused on minimizing the two-qubit CNOT cost g V. V. Shende, S. S. Bullock, and I. L. Markov, IEEE Transactions on Computer-Aided Design of integrated Circuits and Systems 25, 1000 (2006), quantph/11406176 (hereinafter “Shende”)), it is largely unknown in state-of-art synthesis whether the T cost, which scales similarly to the Clifford cost, could be improved.

In this disclosure, an approach is disclosed that focuses on minimizing the T count. Notably, it was found that exploiting a variable number

(λ) of ancilla qubits enables a

(λ) improvement in the T count for λ∈[1, √{square root over (N)}] seen in Table 1, while keeping the Clifford count roughly unchanged. This leads to a T count of

(√{square root over (N)}), representing a quadratic speedup, for the case of preparing arbitrary pure states

$\begin{matrix} {{{{{{\psi\rangle} = {\sum\limits_{x = 0}^{N - 1}\; \frac{a_{x}}{{\overset{->}{a}}_{2}}}}}x}\rangle},{{\overset{->}{\alpha}}_{q} = \left( {\sum\limits_{j = 0}^{N - 1}\; {a_{x}}^{q}} \right)^{1/q}},} & (1) \end{matrix}$

or density matrices

${{{{{\rho = {\sum_{x = 0}^{N - 1}\frac{a_{x}}{{\overset{->}{a}}_{1}}}}}x}\rangle}{\langle x}} = {{Tr}_{garbage}\left\lbrack {{\psi\rangle}{\langle\psi }} \right\rbrack}$

through their purification

$\begin{matrix} {{{{{{{{{\psi\rangle} = {\sum\limits_{x = 0}^{N - 1}\; \sqrt{\frac{a_{x}}{{\overset{->}{a}}_{1}}}}}}x}\rangle}}{garbage}_{x}}\rangle}.} & (2) \end{matrix}$

Of some practical interest is circuit depth, Which also decreases by a factor

(λ) for any λ∈[1, N]. Moreover, all unconditional gate complexity lower bound is proven, independent of any complexity-theoretic assumptions, that demonstrates that an embodiment of the disclosed approach realizes an optimal ancilla-qubit and T count trade-off, up to logarithmic factors. A similar statement for synthesizing arbitrary unitaries is also proven.

Of course, the full quadratic speedup may not always be achievable, or practical. Space constraints of the physical machine limit ancilla usage, and T gates are only finitely expensive. Nevertheless, the ability to trade-off space for a T gate advantage will be very useful to optimizing physical qubit resources in quantum computers.

It is also useful to relate the disclosed approach to those that decompose additionally into black box data-lookup oracles O that allow coherent access to arbitrary classical data {right arrow over (a)} like

O|x

0

|0

=|x

|a _(x)

|garbage_(x)

.  (3)

For instance, Grover search allows for arbitrary state preparation using

(√{square root over (N)}N) queries. See L. K. Grover, Proceedings of the Twenty-eight Annual ACM Symposium on Theory of Computing, STOC '96, 212 (1996). In fact, there exists classical data such that preparing any |ψ

requires only

(polylog(N)) queries and additional primitive quantum gates. This, of course, hides the fact that implementing these oracles cost at least Ω(N) primitive gates in the worst cases.

The improved T gate scaling disclosed herein stems from an improved implementation of the data-lockup oracle of Equation 3. This improvement is referred to herein as a ‘SELECTSWAP’ network, which is decomposed fully into primitive gates. In other words, the results are expressed herein in terms of primitives gates only, which is much stronger than traditional query complexity analyses.

TABLE I State Method Qubits Depth T count ψ⟩  Eq.  (1) Shende $\quad\begin{matrix} {\log \mspace{11mu} N} \\ {\lambda \mspace{11mu} \log \mspace{11mu} \frac{N}{\epsilon}} \end{matrix}$ $\quad\begin{matrix} {N\mspace{11mu} \log \mspace{11mu} \frac{N}{\epsilon}} \\ {\frac{N}{\lambda} + {\log^{2}\mspace{11mu} \frac{N}{\epsilon}}} \end{matrix}$ $\quad\begin{matrix} {N\mspace{11mu} \log \mspace{11mu} \frac{N}{\epsilon}} \\ {\frac{N}{\lambda} + {\lambda \mspace{11mu} \log^{2}\mspace{11mu} \frac{N}{\epsilon}}} \end{matrix}$ ρ Eq. (2) Babbush $\quad\begin{matrix} {\log \mspace{11mu} \frac{N}{\epsilon}} \\ {\lambda \mspace{11mu} \log \mspace{11mu} \frac{N}{\epsilon}} \end{matrix}$ $\quad\begin{matrix} {N + {\log \mspace{11mu} \frac{1}{\epsilon}}} \\ {{\frac{N}{\lambda}\mspace{11mu} \log \mspace{11mu} \lambda} + {\log \mspace{11mu} \frac{1}{\epsilon}}} \end{matrix}$ $\quad\begin{matrix} {N + {\log \mspace{11mu} \frac{N}{\epsilon}}} \\ {\frac{N}{\lambda} + {\lambda \mspace{11mu} \log \mspace{11mu} \frac{N}{\epsilon}}} \end{matrix}$ Operation Qubits Depth T count SELECT b + log N N N SWAP bN log N bN SELECTSWAP bλ + log N $\frac{N}{\lambda}\mspace{11mu} \log \mspace{11mu} \lambda$ $\frac{N}{\lambda} + {b\; \lambda}$ (Top) Big- 

(·) cost of preparing an arbitrary quantum state of dimension N with error ϵ. The Clifford gate ${complexity}\mspace{14mu} {for}\mspace{14mu} {all}\mspace{14mu} {approaches}\mspace{14mu} {is}\mspace{14mu} {{\left( {N\mspace{11mu} {polylog}\mspace{11mu} \left( \frac{N}{\epsilon} \right)} \right)}.}$ (Bottom) Big- 

(·) cost of implementing the data lookup oracle O of Eq. (3). Constant-depth quantum fanouts using stabilizer measurements are applied where applicable to reduce circuit depth. Our results allow for a space-depth trade-off determined by a choice of λ ∈ [1, N], with a minimized T gate complexity of 

({square root over (N)}) by choosing λ ~ {square root over (N)}.

The description begins by describing this network. Subsequently, the ‘SELECTSWAP’ network is applied to the state preparation problem. Using Householder reflections, unitary synthesis is then reduced to state preparation in the appendix. The optimality of this approach is then discussed through matching lower bounds.

III. Example Embodiments IIIA. Data-Lookup Oracle by a SelectSwap Network

The unitary data-lookup oracle of Equation 3 accepts an input number state |x

∈

^(N) where x∈[N], and returns a b-bit number a_(x)∈{0, 1}^(b), where the N values of a_(x) are unstructured but known. The attached garbage state may always be uncomputed by applying O in reverse. An embodiment of the disclosed approach interpolates between standard implementations of O. These are SELECT and SWAP with cost stated in Table 1, which is outlined below.

The SELECT operator applies some arbitrary unitary V_(x) controlled by the state |x

, that is SELECT=Σ_(x=0) ^(N−1)|x

x|⊗V_(x). See A. M. Childs, D. Masiov, Y. Nam, N. J. Ross, and Y. Su, arXiv preprint arXiv:1711.10980 (2017). 1711.10980v1.

Thus O is realized by choosing

V_(x) = X^(a_(x)) ≡ ⊗_(j = 0)^(b − 1)X^(a_(x, j))

to either be identity or the Pauli-X gate depending on the bit string a_(x). As illustrated in block diagram 100 of FIG. 1, the binary control logic costs

(N) Clifford+T gates. As controlled-X too is Clifford,

(bN) Clifford gates are applied in total, and the total T gate complexity remains

(N). These CNOTs may be applied in parallel with constant depth using a quantum fanout, and is applied wherever applicable.

FIG. 1 is a series of schematic block diagrams 100, 102, 104 illustrating aspects of the disclosed technology. In particular, block diagram 100 illustrates the SELECT operator Σ_(x=0) ^(N−1)|x

x|⊗X^(a) ^(x) X with N=4. A naive decomposition of all multiply-controlled-NOTs requires

(N log N) Clifford-+T gates. However, cancellation of adjacent gates reduces this to only

(N). Block diagram 102 illustrates the SWAP network with N=4. Binary values a_(x) are encoded X^(a) ^(x) , and are then swapped to the position of the top register using, a swap network constructed from

(bN) Clifford−T gates. Block diagram 104 illustrates an embodiment of the disclosed SELECTSWAP network with N=16, λ=4 that combines the above two approaches.

The SWAP operator records all values a_(x) in the states |a_(x)

initialized using X^(a) ^(x) applied to N copies of a b-bit register. As illustrated 1n FIG. 1, a network of controlled-swap operators then permutes the desired state |a_(x)

to fixed location. As each controlled-swap operator decomposes into two CNOTs and one TOFFOLI, this network uses

(bN) Clifford+T gates.

The disclosed SELECTSWAP network illustrated by schematic block diagram 104 is a hybrid of the above two schemes. Similar to the SWAP approach, the disclosed network duplicates the b-bit register λ times, where λ∈[1, N] is an integer. Without loss of generality to the scaling, one can assume for simplicity that λ=2^(m) and N=2^(n) are powers of two. One can then use the SELECT operator, controlled by the first n−m qubits of |x

, to write multiple values of a_(x) at a time into these duplicated registers. As there are λ b-bit registers, one can choose V_(x)=⊗_(j=0) ^(λ−)X^(a) ^(xN/λ+j) , where x∈[0, N/λ−1]. The SWAP network controlled by the remaining qubits of |x

then moves the desired data entry |a_(x)

to a fixed location. As the T gate complexity of

$\left( {{\lambda \; b} + \frac{N}{\lambda}} \right)$

is determined only by the dimension of the SELECT and SWAP control registers, this is minimized with value

(√{square root over (Nb)}) at λ=

(√{square root over (N/b)}).

III.B. Arbitrary Quantum State Preparation

Preparation of an arbitrary dimension N=2^(n) quantum state

${{{{\psi\rangle} = {\frac{1}{{\overset{->}{a}}_{2}}{\sum_{x \in {\{{0,1}\}}^{n}}a_{x}}}}}x}\rangle$

using the SELECTSWAP network is now straightforward. One can invoke results in prior art that rely on the data-lookup oracle of Equation 3.

For any bit-string y∈{0, 1}^(w) of length w≤n, let the probability that the first w qubits of |ψ

are in state

${{{y}\rangle}\mspace{14mu} {be}\mspace{14mu} p_{y}} = {\frac{1}{{\overset{->}{a}}_{2}^{2}}{\sum_{{{prefix}_{w}{(x)}} = y}{{a_{x}}^{2}.}}}$

Thus a single-qubit rotation e^(−iYθ)|0

by angle θ=cos⁻¹ √{square root over (p₀)} prepares the state |ψ₁=√{square root over (p₀)}|0

+√{square root over (p₁)}|1

, where p₀ is the probability that the first qubit of |ψ

is in state |0

. One can recursively apply single -qubit rotations on the w+1^(th) qubit conditioned on the first w qubits being in state |y

. The rotation angles θ_(y)=cos⁻¹ √{square root over (p_(y0)/p_(y))} are chosen so that the state produced |ψ_(w+1)

reproduces the correct probabilities on the first w+1 qubits. For instance when w=1, one can map

$\left. {{{{{{{\left. {{{{{{{{{\left. {\psi_{1}\rangle}\mapsto \right.}\psi_{2}}\rangle} = {\sqrt{p_{0}}0}}\rangle}\left( {\sqrt{\frac{p_{00}}{p_{0}}}0}\rangle \right.} + \sqrt{\frac{p_{01}}{p_{0}}}}1}\rangle} \right) + \sqrt{p_{1}}}1}\rangle}\left( {\sqrt{\frac{p_{10}}{p_{1}}}0}\rangle \right.} + \sqrt{\frac{p_{11}}{p_{1}}}}1}\rangle} \right).$

These conditional rotations are implemented using a sequence of data-lookup oracles O₁, . . . , O_(n−1), where O_(w) stores a b-bit approximation of all θ_(y) where y∈{0, 1}^(w). At the w^(th) iteration,

$\begin{matrix} {{{{{{{{{{\left. {{{{{{\left. {{{{{{{{\psi_{w}\rangle} = {{\sum\limits_{y \in {\{{0,1}\}}^{w}}\; \sqrt{p_{y}}}y}}\rangle}\underset{O_{w}}{\mapsto}{\sum\limits_{y \in {\{{0,1}\}}^{w}}\; \sqrt{p_{y}}}}y}\rangle}\theta_{y}}\rangle}\mapsto{\sum\limits_{y \in {\{{0,1}\}}^{w}}\; \sqrt{p_{y}}} \right.y}\rangle}\left( {\sqrt{\frac{p_{y\; 0}}{p_{y}}}0}\rangle \right.} + \sqrt{\frac{p_{y\; 1}}{p_{y}}}}1}\rangle} \right)\theta_{y}}\rangle}\underset{O_{\overset{\uparrow}{w}}}{\mapsto}{\sum\limits_{y \in {\{{0,1}\}}^{w + 1}}\; \sqrt{p_{y}}}}y}\rangle} =}}\psi_{w + 1}}\rangle}.} & (4) \end{matrix}$

Note that any garbage registers are omitted as they are always uncomputed. Also, the second line is implemented using b single-qubit rotations each controlled by a bit of θ_(y). The complex phases of the target state |ψ

are applied to |ψ_(n)

by a final step with a data-lookup oracle storing ϕ_(x)=arg[a_(x)/√{square root over (p_(x))}]. Thus

(b log N) single-qubit rotations are applied in total.

These oracles are implemented with the SELECTSWAP network of schematic block diagram 104 of FIG. 1, using a fixed value of λ for all O_(k). A straightforward sum over the T count of FIG. 1 is

${\left( {{b\mspace{11mu} \lambda \; {\log (N)}} + \frac{N}{\lambda}} \right)},$

which is then added to the total T count of

$\left( {b\mspace{11mu} {\log \left( \frac{N}{\delta} \right)}} \right)$

for synthesizing all single-qubit rotations each to error δ using the phase gradient technique (see, e.g., C. Gidney, Quantum 2, 74 (2018)). The error of the resulting state |ψ′

produced is determined by the number of bits b used to represent the rotation angles, in addition to rotation synthesis error δs. Adding these errors leads to

${{{{\psi^{\prime}\rangle} - {\psi\rangle}}} = {{\underset{\underset{{rotation}\mspace{11mu} {synthesis}}{}}{(\delta)} + \underset{\underset{{bits}\mspace{11mu} {of}\mspace{11mu} {precision}}{}}{\left( {2^{- b}\log \; N} \right)}} \leq \epsilon}},$

which is bounded by ϵ with the choice

$b = {\Theta \left( {\log \left( \frac{\log \; N}{\epsilon} \right)} \right)}$

and δ=Θ(ϵ). As a function of ϵ, the total T gate complexity is then

$\left. {\left( {\frac{N}{\lambda} + {\lambda \; {\log^{2}\left( \frac{N}{\epsilon} \right)}}} \right)} \right).$

A similar calculation for the total depth leads to the complexity in Table 1.

III.C. Purified Density Matrix Preparation

In some applications, it suffices to prepare the density matrix

$\rho = {\sum_{x = 0}^{N - 1}{\frac{a_{x}}{{\overset{->}{a}}_{1}}{x\rangle}{\langle x}}}$

through a quantum state

${{\psi\rangle} = {{\sum_{x = 0}^{N - 1}{\sqrt{\frac{a_{x}}{{\overset{->}{a}}_{1}}}{x\rangle}}}{garbage}_{x}}}\rangle$

of Eq. (2) where the number state |x

is entangled with some garbage that depends only on x. By allowing garbage, it was shown by R. Babbush, C. Gidney, D. W. Berry, N. Wiebe, J. Mc-Clean, A. Paler, A. Fowler, and H. Neven, arXiv preprint arXiv:1805.03662 (2018) that strictly linear T gate complexity in N is achievable, using a SELECT data-lookup oracle corresponding to the λ=1 case of Table 1. We outline the original idea, then generalize the procedure using the SELECTSWAP network, which enables sublinear T gate complexity and better error scaling than the garbage-free approach. As density matrices have positive diagonals, only consider the case of positive a_(x)≥0.

The original approach is based on an observation, By comparing a b-bit number state |a

together with a uniform superposition state

${{{{u_{2^{b}}\rangle} = {\frac{1}{\sqrt{2^{b}}}\sum_{j = 0}^{2^{b} - 1}}}}j}\rangle$

over 2^(b) elements, |a

may be mapped to

$\begin{matrix} {\left. {{{{{{{{{{{{{{{{{a\rangle}->}}a}\rangle}\left( \sqrt{\frac{a}{2^{b}}} \right.0}\rangle}}u_{a}}\rangle} + \sqrt{\frac{2^{b} - a}{2^{b}}}}}1}\rangle}}u_{\geq a}}\rangle} \right),} & (5) \end{matrix}$

where we denote a uniform superposition after the first a elements by

${{u \geq a}\rangle} = {\sum\limits_{j = a}^{2^{b} - 1}{\frac{j\rangle}{\sqrt{2^{b} - a}}.}}$

This may be implemented using quantum addition (see S. A. Cuccaro, T. C. Draper, S. A. Kutin, and D. P. Moulton, arXiv preprint quant-ph/0410184 (2004)), which costs

(b) Clifford+T gates with depth

(b).

This observation is converted to state-preparation in four steps. First, the normalized coefficients

${a_{x}\frac{N\; 2^{b}}{{a}_{1}}} \approx a_{x}^{\prime}$

are rounded to nearest integer values such that ∥{right arrow over (a)}′∥₁=N2^(b). Second, the data-lookup oracle that writes two numbers a″_(x)∈[2^(b)] and f(x)∈[N] such that a′_(x)=a″_(x)+Σ_(y∈{f) ⁻¹ _((x)})(2^(b)−a″_(y)). Thus

O|x

|0

|0

=|x

|a″ _(x)

|f(x)

,  (6)

where the irrelevant garbage state has been omitted. Third, the oracle O is applied to a uniform superposition over |x

, and the comparator trick of Eq. (5) is applied. This produces the state

$\sum\limits_{x = 0}^{N - 1}{\frac{x\rangle}{\sqrt{N}}{a_{x}^{''}\rangle}{{f(x)}\rangle}{\left( {{\sqrt{\frac{a_{x}^{''}}{2^{b}}}{0\rangle}{u_{a_{x}^{''}}\rangle}} + {\ldots {1\rangle}{{u \geq a_{x}^{''}}\rangle}}} \right).}}$

Finally, |f(x)

is swapped with |x

, controlled on the |1

state. This leads to a state

${\psi\rangle} = {\sum\limits_{x = 0}^{N - 1}{\sqrt{\frac{a_{x}^{\prime}}{{{\overset{\rightarrow}{a}}^{\prime}}_{1}}}{x\rangle}{{{garbage}_{x}\rangle}.}}}$

After tracing out the garbage register, the resulting density matrix ρ′ approximates the desired state ρ with trace distance

∥ρ′−ρ∥₁=

(2^(−b))≤ϵ.  (7)

The T gate complexity is then the cost of the data-lookup oracle of Eq. (6) plus

(b) for the comparator of Eq. (5), plus

(log N) for the controlled swap with |f(x)

. By implementing this data-lookup oracle with the SELECTSWAP network, one immediately obtains the stated T gate complexity of

${{\left( {{\lambda \left( {b + {\log \; N}} \right)} + \frac{N}{\lambda}} \right)} = {\left( {{\lambda \; {\log \left( {N/\epsilon} \right)}} + \frac{N}{\lambda}} \right)}},$

where b=

(log (1/ϵ)) is chosen.

III.D. Lower Bound

In this section, the optimality of the above-described construction is proven through a circuit counting argument. The most general circuit on q qubits that uses Γ T-gates has the canonical form C·Π_(j=1) ^(Γ)e^(−iπP) ^(j) ^(/8), where each P_(j) is one of 4^(q) possible Pauli operators, and C is one of 2

^((q) ² ⁾ possible Clifford operators. Thus the number of unique quantum circuits is at most

Unique quantum circuits=

(4^(qΓ+)

^((q) ² ⁾  (8)

A lower bound on the cubit and T-gate complexity of the data-lookup oracle of Equation 3 is obtained by counting the number of unique Boolean functions f:[N]→{0, 1}^(b). As there are 2^(bN) such functions, one can compare with Eq. (8). This leads to a lower bound on the space-T-gate product

qΓ=Ω(bN−q ²).  (9)

As the SELECTSWAP complexity in block diagram 104 of FIG. 1 is qΓ=

(λ²b²+bN+log (N)(1/λ+λb)), this is optimal up to logarithmic factors so long as the number of T-gates dominates the qubit count like λ=o(√{square root over (N/b)}), which is the case in most quantum circuits of interest.

A similar lower bound on state preparation is obtained by counting the number of dimension-N quantum states that a distinguishable with error ϵ. Without loss of generality, one can only count quantum states |ψ

∈

^(N) with real coefficients. These states live on the surface a unit-ball

_(N) of dimension N, with area

${{Area}\left\lbrack _{N} \right\rbrack} = {\frac{2\; \pi^{N/2}}{\left( {{N/2} - 1} \right)!}.}$

Let one now fix a state |ψ

. Then the states |χ

that satisfy ∥|ψ

−|χ∥≤ϵ live inside a ϵ-ball

_(N−1) with volume

${\left( {{{Vol}\left\lbrack _{N - 1} \right\rbrack}\epsilon^{N - 1}} \right)} = {{\left( {\frac{\pi^{N/2}}{\left( {N/2} \right)!}\epsilon^{N - 1}} \right)}.}$

Thus there are at least

${\Omega \left( \frac{{Area}\left\lbrack _{N} \right\rbrack}{{{Vol}\left\lbrack _{N - 1} \right\rbrack}\epsilon^{N - 1}} \right)} = {\Omega \left( {\sqrt{N}\epsilon^{{- N} + 1}} \right)}$

quantum states. Once again by comparing with Eq. (8), one can obtain a T-gate lower bound of

qΓ=Ω(N log(1/ϵ)−q ²).  (10)

This also matches the cost of the disclosed approach in Eq. (8) up to logarithmic factors, so long as λ=o(√{square root over (N/log(1/ϵ)))}. An analogous argument can be made for density matrix preparation by considering the unit simplex instead of the unit ball.

III.E. Error Analysis of Arbitrary Quantum State Preparation

The approach by Shende, Bullock, and Markov synthesizes a unitary A that prepares a pure state

${A{0\rangle}} = {{\sum\limits_{x = 0}^{N}{\frac{a_{x}}{{\overset{\rightarrow}{a}}_{2}}{x\rangle}}} = {\psi\rangle}}$

with arbitrary coefficients in N=2^(n) dimensions. A key element of the circuit are j∈{0, 1, . . . n−1} multiplexors U_(j) where

$\begin{matrix} {{U_{j} = {\sum\limits_{x = 0}^{2^{j} - 1}{{x\rangle}{{\langle x} \otimes e^{{- i}\; \pi \; \theta_{j,x}Z}}}}},} & (11) \end{matrix}$

for some set of rotation angles θ_(j, x). Each multiplexor is applied twice—once to create a pure state with the right probabilities |a_(x)|², and once to apply the correct phase e^(i arg[a) ^(x) ^(]). In the following, these multiplexors U_(j) are approximated by a unitary U′_(j) to error δ like ∥U′_(j)−U_(j)∥≤δ. Using a triangle inequality, this leads to an approximate A′ such that

∥A′−A∥≤2nδ.  (12)

Hence the state |ψ′

=A′|0

approximates |ψ

with error

∥|ψ′

−|ψ

∥≤∥A′−A∥≤2nδ.  (13)

In embodiments of the disclosed approach, these multiplexors are implemented using the data-lookup oracles O_(j) that encode a b-bit approximation θ′_(j, x) of these angles, that is |θ′_(j, x)−θ_(j, x)|≤2^(−b). In other words,

O _(j) |x

|0

=|x

|θ′ _(x,k)

.  (14)

Using the controlled phase gradient operation

$\begin{matrix} \begin{matrix} {{{GRAD} = {{{0\rangle}{{\langle 0} \otimes G^{\dagger}}} + {{0\rangle}{{\langle 0} \otimes G}}}},} \\ {{G = {\sum\limits_{\theta = 0}^{2^{b} - 1}{e^{{- \pi}\; \theta \; 2^{- b}}{\theta\rangle}{\langle\theta }}}},} \end{matrix} & (15) \end{matrix}$

this implements the multiplexor U_(j) ⁽¹⁾ where

$\begin{matrix} {U_{j}^{\prime} = {\sum\limits_{\theta = 0}^{2^{j} - 1}\; {{x\rangle}{{\langle x} \otimes {e^{{- i}\; \pi \; \theta_{j,x}^{\prime}Z}.}}}}} & (16) \end{matrix}$

This approximates U_(j) with error

∥U′ _(j) −U _(j) ∥≤∥I−e ^(iπ2) ^(−b) ∥≤π2^(−b).  (17)

One also needs to account for he cost of approximating the phase gradient operation. A naive approach implements GRAD using b single-quit rotations e^(−iπ2) ^(−k) ^(Z), each controlled by the k^(th) output bit of O_(j). Using standard single-qubit unitary synthesis techniques (see V. Kliuchnikov, D. Maslov, and M. Mosca, Phys. Rev. Lett. 110, 190302 (2013)), approximating GRAD to error γ requires

${{\left( {b\; \log \frac{b}{\gamma}} \right)}\mspace{14mu} {Clifford}} + {T\mspace{14mu} {{gates}.}}$

The resulting unitary A″ prepares the state |ψ″

=A″|0

that approximates |ψ

with error

∥|ψ″

−|ψ∥≤∥A″−A∥≤πn2^(−b+1) +nγ≤ϵ,

which is controlled by choosing

$b = {{{\Theta \left( {\log \left( \frac{n}{\epsilon} \right)} \right)}\mspace{14mu} {and}\mspace{14mu} \gamma} = {{\Theta \left( \frac{\epsilon}{n} \right)}.}}$

A better approach (see C. Gidney, Quantum 2, 14 (2018)) implements the phase gradient GRAD with a reversible adder ADD applied to the Fourier state

where

$\begin{matrix} \begin{matrix} {{{{ADD}{x\rangle}{y\rangle}} = {{x\rangle}{{y + {x\mspace{14mu} {mod}\mspace{14mu} 2^{b}}}\rangle}}},} \\ {{\mathcal{F}\rangle} = {\frac{1}{\sqrt{2^{b}}}{\sum\limits_{x = 0}^{2^{b} - 1}{e^{i\; \pi \; {x/2^{b}}}{{x\rangle}.}}}}} \end{matrix} & (18) \end{matrix}$

Thus

ADD |x

|

=e ^(−iπx2) ^(−b) |x

|

.  (19)

The T cost: of each adder is

(b). As the Fourier state is not consumed, an approximation |

′

of it to error γ has a one-time T cost of

(b log (1/γ) The resulting unitary A″′ prepares the state |ψ″′

=A″′|0

|

′

. This approximates |ψ

with error

∥|ψ″′

−|ψ

|

∥≤πn2^(−b+1)+γ≤ϵ,

which is controlled by choosing

$b = {{{\Theta \left( {\log \left( \frac{n}{\epsilon} \right)} \right)}\mspace{14mu} {and}\mspace{14mu} \gamma} = {{\Theta (\epsilon)}.}}$

III.F. Reducing Unitary Synthesis to State Preparation

Consider N×N unitary matrix U and let integer K be between 1 and N. Isometry synthesis problem for U is to find a quantum circuit that implements unitary V, such that its first K columns equal to first K columns of V. To define approximate unitary isometry problem, one can use the notion of weak semi-two norm ∥A∥_(2, k)=max_(b<K)∥A|b

∥. Weak semi-two-norm with parameter K of matrix A is the biggest norm of vectors ∥Ax∥ where x goes over the first K standard basis vectors. Note that ∥V−U∥_(2, K)=0 if and only if first K columns of V and U coincide. This is why map A

∥A∥_(2, K) is called semi-norm: ∥A∥_(2, K)=0 does not imply that A=0. The approximate isometry synthesis problem for target unitary U and precision ε is to find a circuit that implements unitary V such that ∥V−U∥_(2, K)≤ε.

It has been shown in E. Knill, “Approximation by Quantum Circuits,” arXiv:quant-ph/9508006 (1995) [quant-ph] that isometry synthesis problem can be reduced to K state synthesis problems and synthesis of K operators exp(e^(iϕ)|e₁

e₁|) where |e₁

is the first standard basis vector. The idea, is illustrated here for K=N. Using eigen-basis |u_(k)

unitary matrix U can be written as exp (Σ_(k=1) ^(N)iϕ_(k)|u_(k)

u_(k)|). Introducing operations R_(k)=exp(e^(iϕ) ^(k) |u_(k)

u_(k)|) one can express U as product Π_(k=1) ^(N)R_(k). Let V_(k) be a unitary operator that prepares state u_(k) starting from |e₁

then R_(k)=V_(k)exp(e^(iϕ) ^(k) |e₁

e₁|)V_(k) ^(†). The case K<N follows from the Lemma 3.10 on Page 10. The lemma shows that any unitary matrix U can be replaced by a unitary matrix U′ such that first K columns of U and U′ coincide and U′ has at least N−K eigenvalues equal to 1. This implies that at least N−K operators R_(k) in the decomposition of U′ are identity operators. Using outline scheme the cost of isometry synthesis is twice the cost of state synthesis of each eigen-vector |u_(k)

plus the cost of synthesis of each of exp(e^(iϕ) ^(k) |e₁

₁|).

Alternatively, one can use Householder reflections decomposition (see, e.g., A. S. Householder, Journal of the ACM 5, 339 (1958) to find another U″ that is a product of K reflections exp(e^(iπ)|v_(j)

v_(j)|)=

−2|v_(j)

v_(j)| and diagonal matrix diag(e^(iϕ′) ¹ , . . . , e^(iϕ′) ^(K) , 1, . . . , 1) such that first K columns of U and U″ coincide. Note that the representation of a unitary as a product of N operators exp(e^(iϕ) ^(j) |v_(j)

v_(j)|) is not unique, another method for finding such decomposition closely related to A. S. Householder, Journal of the ACM 5, 339 (1958) can be found in P. A. Ivanov, E. S. Kyoseva, and N. V. Vitanov, (2007), 10.1103/PhysRevA.74.022323, arXiv:0708.2811. It has a slight advantage in that it does not require finding eigen-basis of U.

It is possible to get rid of the need for implementing diag(e^(iϕ′) ¹ , . . . , e^(iϕ′) ^(K) , 1, . . . , 1) or exp(e^(iϕ)|e₁

e₁|) by using one ancillary qubit as discussed in V. Kliuchnikov, ArXiv e-prints, 1 (2013), arXiv:1306.3200 [quant-ph]. To implement unitary U it is sufficient to implement unitary W=|0

1|⊗U+|1

0|⊗U^(†) by using reflection decomposition. Let u₁, . . . , u_(N) be columns of U. According to Lemma 1 on Page 1, operator W is equal to the product of reflections

−2|ψ

ψ| where |ψ

goes over vectors |w_(j)

=(|1

⊗|j

−|0

⊗|u_(j)

)/√{square root over (2)} for j from 1 to N. It is sufficient to take product of reflections around |w_(j)

for j from 1 to K if one is interested in implementing first K columns of U. Finally, note that given unitary V′_(j) that prepares |u_(j)

starting from |e₁

, one can prepare state |w_(j)

starting from |0

⊗|e₁

. First apply Hadamard gate to the first qubit, then the sequence of CNOT gates to prepare state |1

⊗|j

+|0

⊗|e₁

and finally apply Controlled-V′_(j) negatively controlled on the first qubit. When this method is applied to the synthesis of sparse isometries, the states being synthesized are again sparse. The number of non-clifford gates used to synthesize an isometry is twice the number of non-clifford gates needed to synthesize each of K columns controlled on a qubit.

Approximate isometry synthesis reduces to approximate state synthesis by using discussed decompositions and properties of semi-norms ∥A∥_(2, K) discussed in E. Knill, 1 (1995), arXiv:quant-ph/9508006 [quant-ph].

III.G. Lower Bounds

The total number of isometries within at least distance ϵ from each other can be estimated using Lemma 4.3 on Page 14. Roughly, the number of isometries Ω((1/ϵ)^(KN)). i

FIG. 6 is a flowchart 600 showing an example embodiment for implementing an embodiment of the disclosed technology. The particular operations and sequence of operations should not be construed as limiting, as they can be performed alone or in any combination, subcombination, and/or sequence with one another. Additionally, the illustrated operations can be performed together with one or more other operations. In particular, flowchart 600 illustrates a method for synthesizing a data-lookup oracle in accordance with the disclosed technology.

At 610, various input parameters are input. In the illustrated embodiment, the input parameters are: (1) Length N=^(n) list of b-bit numbers L=a₀a₁, a_(N−1); (2) A number Between 1 and N; (3) n-qubit index register X; (4) b-qubit ancilla registers R=R₀, R₁, R⁻¹; and (5) quantum state |x>.

At 612, the Select quantum algorithm is applied to load elements of list L in parallel to register R.

At 614, the Swap quantum algorithm is applied to move one of the registers R to a standard output.

At 616, a quantum state quantum state |x>|a_(x)>|garbage _(x)> is output.

FIG. 7 is a flowchart 700 showing an example embodiment for implementing an embodiment of the disclosed technology. The particular operations and sequence of operations should not be construed as limiting, as they can be performed alone or in any combination, subcombination, and/or sequence with one another. Additionally, the illustrated operations can be performed together with one or more other operations. In particular, flowchart 700 illustrates a method for synthesizing a quantum circuit description in accordance with the disclosed technology.

At 710, a quantum algorithm description is input (e.g. into a classical computer). The quantum algorithm description can be, for example, a description in a high-level functional language (e.g., F #).

At 712, the quantum algorithm description is synthesized into a synthesized quantum circuit representation (e.g., using the classical computer and using an appropriate compilation/synthesis tool for quantum computing, such as LIQUi|>). In the illustrated embodiment, the quantum circuit representation is implementable on a quantum computing device, and the synthesizing comprises assigning one or more ancilla qubits to be used for at least one non-Clifford operation.

At 714, the synthesized quantum circuit representation is output. The synthesized quantum circuit representation is a set of low-level machine instructions for implementation on a quanturn device.

At 716, a quantum computing device is controlled to implement the quantum circuit representations (e.g., by a classical computer in communication with a quantum computing device, such as in a configuration as shown in FIG. 5).

In some embodiments, the ancilla qubits to be used for at least one non-Clifford operation replace at least one Toffoli-gate. In further embodiments, the synthesized quantum circuit representation includes a combination of both Toffili gates and ancilla qubits to perform non-Clifford operations, the combination being determined at least in part by a user-selectable variable. In certain embodiments, the synthesizing comprises using a select-swap operation. In particular implementations, the select-swap operation enables sublinear T-gate complexity. In further implementations, the select-swap operation results from a combination of a select operation and a swap network. In some embodiments, the method reduces non-Clifford gates at a cost of greater overall ancilla qubits. In further embodiments, the synthesizing implements a data-lookup oracle using a select-swap operation. In certain embodiments, the method is performed to synthesize arbitrary unitaries.

Any of the disclosed embodiments can be implemented by one or more computer-readable media storing computer-executable instructions, which when executed by a computer cause the computer to perform any of the disclosed methods. Also disclosed herein are systems for performing embodiments of the disclosed embodiments comprising a classical computer configured to program, control, and/or measure a quantum computing device.

Further embodiments include a quantum circuit comprising a combination of Clifford and non-Clifford gates, wherein the number of non-Clifford gates is controlled by a tunable factor, wherein the tunable factor achieves a desired space-depth tradeoff for the quantum circuit.

IV. Example Computing Environments

FIG. 2 illustrates a generalized example of a suitable classical computing environment 200 in which several of the described embodiments can be implemented. The computing environment 200 is not intended to suggest any limitation as to the scope of use or functionality of the disclosed technology, as the techniques and tools described herein can be implemented in diverse general-purpose or special-purpose environments that have computing hardware.

With reference to FIG. 2, the computing environment 200 includes at least one processing device 210 and memory 220. In FIG. 2, this most basic configuration 230 is included within a dashed line. The processing device 210 (e.g., a CPU or microprocessor) executes computer-executable instructions. In a multi-processing system, multiple processing devices execute computer-executable instructions to increase processing power. The memory 220 may be volatile memory (e.g., registers, cache, RAM, DRAM, SRAM), non-volatile memory (e.g., ROM, EEPROM, flash memory), or some combination of the two. The memory 220 stores software 280 implementing tools for generating/synthesizing/controlling any of the disclosed quantum-circuit techniques as described herein. The memory 220 can also store software 280 for synthesizing, generating, or compiling quantum circuits for implementing any of the techniques as described herein.

The computing environment can have additional features. For example, the computing environment 200 includes storage 240, one or more input devices 250, one or more output devices 260, and one or more communication connections 270. An interconnection mechanism (not shown), such as a bus, controller, or network, interconnects the components of the computing environment 200. Typically, operating system software (not shown) provides an operating environment for other software executing in the computing environment 200, and coordinates activities of the components of the computing environment 200.

The storage 240 can be removable or non-removable, and includes one or more magnetic disks (e.g., hard drives), solid state drives (e.g., flash drives), magnetic tapes or cassettes, CD-ROMs, DVDs, or any other tangible non-volatile storage medium which can be used to store information and which can be accessed within the computing environment 200. The storage 240 can also store instructions for the software 280 implementing any of the disclosed quantum-circuit design techniques. The storage 240 can also store instructions for the software 280 for generating and/or synthesizing any of the described techniques, systems, or reversible circuits.

The input device(s) 250 can be a touch input device such as a keyboard, touchscreen, mouse, pen, trackball, a voice input device, a scanning device, or another device that provides input to the computing environment 200. The output device(s) 260 can be a display device (e.g., a computer monitor, laptop display, smartphone display, tablet display, netbook display, or touchscreen), printer, speaker, or another device that provides output from the computing environment 200.

The communication connection(s) 270 enable communication over a communication medium to another computing entity. The communication medium conveys information such as computer-executable instructions or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired or wireless techniques implemented with an electrical, optical, RF, infrared, acoustic, or other carrier.

As noted, the various methods, circuit design techniques, or compilation/synthesis techniques can be described in the general context of computer-readable instructions stored on one or more computer-readable media. Computer readable media are any available media (e.g., memory or storage device) that call be accessed within or by a computing environment. Computer-readable media include tangible computer-readable memory or storage devices, such as memory 220 and/or storage 240, and do not include propagating carrier waves or signals per se (tangible computer-readable memory or storage devices do not include propagating carrier waves or signals per se).

Various embodiments of the methods disclosed herein can also be described in the general context of computer-executable instructions (such as those included in program modules) being executed in a computing environment by a processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, and so on, that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or split between program modules as desired in various embodiments. Computer-executable instructions for program modules may be executed within a local or distributed computing environment.

An example of a possible network topology 300 (e.g., a client-server network) for implementing a system according to the disclosed technology is depicted in FIG. 3. Networked computing device 320 can be, for example, a computer running a browser or other software connected to a network 312. The computing device 320 can have a computer architecture as shown in FIG. 2 and discussed above. The computing device 320 is not limited to a traditional personal computer but can comprise other computing hardware configured to connect to and communicate with a network 312 (e.g., smart phones, laptop computers tablet computers, or other mobile computing devices, servers, network devices, dedicated devices, and the like). Further, the computing device 320 can comprise an FPGA or other programmable logic device. In the illustrated embodiment, the computing device 320 is configured to communicate with a computing device 330 (e.g. remote server, such as a server in a cloud computing environment via a network 312. In the illustrated embodiment, the computing device 320 is configured to transmit input data to the computing device 330, and the computing device 330 is configured to implement a technique according to any of the disclosed embodiments and/or a circuit generation or compilation/synthesis methods for generating quantum circuits based on or in conjunction with any of the techniques disclosed herein. The computing device 330 can output results to the computing device 320. Any of the data received from the computing device 330 can be stored or displayed on the computing device 320 (e.g., displayed as data on a graphical user interface or web page at the computing devices 320). In the illustrated embodiment, the illustrated network 312 can be implemented as a Local Area Network (LAN) using wired networking (e.g., the Ethernet IEEE standard 802.3 or other appropriate standard) or wireless networking (e.g. one of the IEEE standards 802.11a, 802.11b, 802.11g, or 802.11n or other appropriate standard). Alternatively, at least part of the network 812 can be the Internet or a similar public network and operate using an appropriate protocol (e.g., the HTTP protocol).

Another example of a possible network topology 400 (e.g., a distributed computing environment) for implementing a system according to the disclosed technology is depicted in FIG. 4. Networked computing device 420 can be, for example, a computer running a browser or other software connected to a network 412. The computing device 420 can have a computer architecture as shown in FIG. 2 and discussed above. In the illustrated embodiment, the computing device 420 is configured to communicate with multiple computing devices 430, 431, 432 (e.g., remote servers or other distributed computing devices, such as one or more servers in a cloud computing environment) via the network 412. In the illustrated embodiment, each of the computing devices 430, 431, 432 in the computing environment 400 is used to perform at least a portion of the disclosed processes and/or circuit generation or synthesis/compilation process. In other words, the computing devices 430, 431, 432 form a distributed computing environment in which the disclosed processes and/or generation/compilation/synthesis processes are shared across multiple computing devices. The computing device 420 is configured to transmit input data to the computing devices 430, 431, 432, which are configured to distributively implement such as process, including performance of any of the disclosed methods or creation of any of the disclosed circuits, and to provide results to the computing device 420. Any of the data received from the computing devices 430, 431, 432 can be stored or displayed on the computing device 420 (e.g., displayed as data on a graphical user interface or web page at the computing devices 420). The illustrated network 412 can be any of the networks discussed above with respect to FIG. 3.

With reference to FIG. 5, an exemplary system for implementing the disclosed technology includes computing environment 500. In computing environment 500, a compiled quantum computer circuit description (including quantum circuits for performing any of the techniques as disclosed herein) can be used to program (or configure) one or more quantum processing units such that the quantum processing unit(s) implement the circuit described by the quantum computer circuit description.

The environment 500 includes one or more quantum processing units 502 and one or more readout device(s) 508. The quantum processing unit(s) execute quantum circuits that e precompiled and described by the quantum computer circuit description. The quantum processing unit(s) can be one or more of, but are not limited to: of a superconducting quantum computer; (b) an ion trap quantum computer; (c) a fault-tolerant architecture for quantum computing; and/or (d) a topological quantum architecture (e.g., a topological quantum computing device using Majorana zero modes). The precompiled quantum circuits, including any of the disclosed circuits, can be sent into (or otherwise applied to) the quantum processing unit(s) via control lines 506 at the control of quantum processor controller 520. The quantum processor controller (QP controller) 520 can operate in conjunction with a classical processor 510 (e.g., having an architecture as described above with respect to FIG. 2) to implement the desired quantum computing process. In the illustrated example, the QP controller 520 further implements the desired quantum computing process via one or more QP subcontrollers 504 that are specially adapted to control a corresponding one of the quantum processor(s) 502. For instance, in one example, the quantum controller 520 facilitates implementation of the compiled quantum circuit by sending instructions to one or more memories (e.g., lower-temperature memories), which then pass the instructions to low-temperature control unit(s) (e.g., QP subcontroller(s) 504) that transmit, for instance, pulse sequences representing the gates to the quantum processing unit(s) 502 for implementation. In other examples, the QP controller(s) 520 and QP subcontroller(s) 504 operate to provide appropriate magnetic fields, encoded operations or other such control signals to the quantum processor(s) to implement the operations of the compiled quantum computer circuit description. The quantum controller(s) can further interact with readout devices 508 to help control and implement the desired quantum computing process (e.g., by reading or measuring out data results from the quart urn processing units once available, etc.)

With reference to FIG. 5, compilation is the process of translating a high-level description of a quantum algorithm into a quantum computer circuit description comprising a sequence of quantum operations or gates, which can include the circuits as disclosed herein. The compilation can be performed by a compiler 522 using a classical processor 510 (e.g., as shown in FIG. 2) of the environment 500 which loads the high-level description from memory or storage devices 512 and stores the resulting quantum computer circuit description in the memory or storage devices 512.

In other embodiments, compilation and/or verification can be performed remotely by a remote computer 560 (e.g., a computer having a computing environment as described above with respect to FIG. 2) which stores the resulting quantum computer circuit description in one or more memory or storage devices 562 and transmits the quantum computer circuit description to the computing environment 500 for implementation in the quantum processing unit(s) 502. Still further, the remote computer 500 can store the high-level description in the memory or storage devices 562 and transmit the high-level description to the computing environment 500 for compilation and use with the quantum processor(s). In any of these scenarios, results from the computation performed by the quantum processor(s) can be communicated to the remote computer after and/or during the computation process. Still further, the remote computer can communicate with the QP controller(s) 520 such that the quantum computing process (including any compilation, verification, and QP control procedures) can be remotely controlled by the remote computer 560. In general, the remote computer 560 communicates with the QP controller(s) 520, compiler/synthesizer 522, and/or verification tool 523 via communication connections 550.

In particular embodiments, the environment 500 can be a cloud computing environment, which provides the quantum processing resources of the environment 500 to one or more remote computers (such as remote computer 560) over a suitable network (which can include the internet).

V. Concluding Remarks

We have shown that arbitrary quantum states with N coefficients specified by classical data may be prepared using a T gate complexity

(√{square root over (N)}) that is an optimal square-root improvement over prior art. As the Clifford group is efficiently simulable, the ‘quantumness’ of a quantum algorithm is captured in part by its T gate cost. Our results show that reading classical data into a quantum algorithm is a ‘classical’ task that costs

(N) Clifford gates and should be separated from the harder part of creating a superposition captured by the T gate complexity.

Having described and illustrated the principles of the disclosed technology, with reference to the illustrated embodiments, it will be recognized that the illustrated embodiments can be modified in arrangement and detail without departing from such principles. For instance, elements of the illustrated embodiments shown in software may be implemented in hardware and vice-versa. Also, the technologies from any example can be combined with the technologies described in any one or more of the other examples. It will be appreciated that procedures and functions such as those described with reference to the illustrated examples can be implemented in a single hardware or software module, or separate modules can be provided. The particular arrangements above are provided for convenient illustration, and other arrangements can be used. 

What is claimed is:
 1. A method, comprising: inputting a quantum algorithm description; synthesizing the quantum algorithm description into a synthesized quantum circuit representation, wherein the quantum circuit representation is implementable on a quantum computing device, and wherein the synthesizing comprises assigning one or more ancilla qubits to be used for at least one non-Clifford operation; and outputting the quantum circuit representation.
 2. The method of claim 1, wherein the ancilla qubits to be used for at least one non-Clifford operation replace at least one Toffoli-gate.
 3. The method of claim 1, wherein the synthesized quantum circuit representation includes a combination of both Toffili gates and ancilla qubits to perform non-Clifford operations, the combination being determined at least in part by a user-selectable variable.
 4. The method of claim 1, wherein the synthesizing comprises using a select-swap operation.
 5. The method of claim 4, wherein the select-swap operation enables sublinear T-gate complexity.
 6. The method of claim 4, wherein the select-swap operation results from a combination of a select operation and a swap network.
 7. The method of claim 1, wherein the method reduces non-Clifford gates at a cost of greater overall ancilla qubits.
 8. The method of claim 1, wherein the synthesizing implements a data-lookup oracle using a select-swap operation.
 9. The method of chant 1, wherein the method is performed to synthesize arbitrary unitaries.
 10. The method of claim 1, further comprising controlling a quantum computing device to implement the quantum circuit representations.
 11. One or more computer-readable media storing computer-executable instructions, which when executed by a classical computer cause the classical computer to perform a method of controlling a quantum computing device, the method comprising: inputting a quantum algorithm description; synthesizing the quantum algorithm description into a synthesized quantum circuit representation, wherein the quantum circuit representation is implementable on a quantum computing device, and wherein the synthesizing comprises assigning one or more ancilla qubits to be used for at least one non-Clifford operation; and outputting the quantum circuit representation.
 12. The one or more computer-readable media of claim 11, wherein the ancilla qubits to be used for at least one non-Clifford operation replace at least one Toffoli-gate.
 13. The one or more computer-readable media of claim 11, wherein the synthesized quantum circuit representation includes a combination of both Toffili gates and ancilla qubits to perform non-Clifford operations, the combination being determined at least in part by a user selectable variable.
 14. The one or more computer-readable media of claim 11, wherein the synthesizing comprises using a select-swap operation.
 15. The one or more computer-readable media of claim 14, wherein the select-swap operation enables sublinear T-gate complexity.
 16. The one or more computer-readable media of claim 14, wherein the select swap operation results from a combination of a select operation and a swap network.
 17. The one or more computer-readable media of claim 11, wherein the synthesizing implements a data-lookup oracle using a select-swap operation
 18. The one or more computer-readable media of claim 11, wherein the method is performed to synthesize arbitrary unitaries.
 19. The one or more computer-readable media of claim 11, wherein the method further comprises controlling a quantum computing device to implement the quantum circuit representations.
 20. A quantum circuit comprising a combination of Clifford and non-Clifford gates, wherein the number of non-Clifford gates is controlled by a tunable factor, wherein the tunable factor achieves a desired space-depth tradeoff for the quantum circuit. 